﻿<?php
	include "../util/smtp.php";
	
	$fullName = $_POST["fullName"];
	$address = $_POST["address"];
	$phoneNumber = $_POST["phoneNumber"];
	$email = $_POST["email"];
	$message = $_POST["message"];

	$mailMessage = "Tên: $fullName<br/>
				   Địa chỉ: $address<br/>
				   SĐT: $phoneNumber<br/>
				   Email: $email<br/>
				   Nội dung: $message";

	if (!SendMail("info@giaan4s.com","info@giaan4s.com", "Liên Hệ Gia An", $mailMessage, $fullName)) {
		echo "<script>window.location.href = '../pc/contact.php?e=no';</script>";
	} else {
		echo "<script>window.location.href = '../pc/contact.php?e=ok';</script>";
	}
?>